package com.eaoa.vo.pub.base;

import java.io.Serializable;

/**
 * 
 * This is an object that contains data related to the PUB_PERMISSIONSET table.
 * 
 * Do not modify this class because it will be overwritten if the configuration
 * file
 * 
 * related to this class is modified.
 * 
 * For more information visit <a href="http://hibernatesynch.sourceforge.net">
 * 
 * The Hibernate Synchronizer page</a>, or contact
 * 
 * <a href="mailto: jhudson8.users.sourceforge.net">Joe Hudson</a>
 * 
 * 
 * 
 * @hibernate.class
 * 
 * table="PUB_PERMISSIONSET"
 * 
 */

public abstract class BasePubRole implements Serializable {

	private int hashCode = Integer.MIN_VALUE;

	// primary key

	
	private Long roleno;
    private String rolecode;
    private String rolename;
    private String roledesc;

	// collections

	private java.util.Set pubModules;

	private java.util.Set pubAccounts;

	// constructors

	public BasePubRole() {
		initialize();
	}

	/**
	 * 
	 * Constructor for primary key
	 * 
	 */

	public BasePubRole(java.lang.Long roleno) {
		this.setRoleno(roleno);
		initialize();

	}
	
	protected void initialize() {
	}

	/**
	 * 
	 * Return the unique identifier of this class
	 * 
	 * @hibernate.id
	 * 
	 * generator-class="sequence"
	 * 
	 * column="PERMISSIONSETID"
	 * 
	 */

	

	public java.util.Set getPubModules() {

		return this.pubModules;

	}

	public void setPubModules(java.util.Set pubModules) {

		this.pubModules = pubModules;

	}

	public void addToPubModules(Object obj) {

		if (null == this.pubModules)
			this.pubModules = new java.util.HashSet();

		this.pubModules.add(obj);

	}

	public boolean equals(Object obj) {

		if (null == obj)
			return false;

		if (!(obj instanceof BasePubRole))
			return false;

		else {

			BasePubRole mObj = (BasePubRole) obj;

			if (null == this.getRoleno()
					|| null == mObj.getRoleno())
				return false;

			else
				return (this.getRoleno().equals(mObj
						.getRoleno()));

		}

	}

	public int hashCode() {

		if (Integer.MIN_VALUE == this.hashCode) {

			if (null == this.getRoleno())
				return super.hashCode();

			else {

				String hashStr = this.getClass().getName() + ":"
						+ this.getRoleno().hashCode();

				this.hashCode = hashStr.hashCode();

			}

		}

		return this.hashCode;

	}


	public java.util.Set getPubAccounts() {
		return pubAccounts;
	}

	public void setPubAccounts(java.util.Set pubAccounts) {
		this.pubAccounts = pubAccounts;
	}

	public void addToEmployees(Object obj) {

		if (null == this.pubAccounts)
			this.pubAccounts = new java.util.HashSet();

		this.pubAccounts.add(obj);

	}

	public Long getRoleno() {
		return roleno;
	}

	public void setRoleno(Long roleno) {
		this.roleno = roleno;
		this.hashCode = Integer.MIN_VALUE;
	}

	public String getRolecode() {
		return rolecode;
	}

	public void setRolecode(String rolecode) {
		this.rolecode = rolecode;
	}

	public String getRolename() {
		return rolename;
	}

	public void setRolename(String rolename) {
		this.rolename = rolename;
	}

	public String getRoledesc() {
		return roledesc;
	}

	public void setRoledesc(String roledesc) {
		this.roledesc = roledesc;
	}
	
	

}